//
//  UIFont+Custom.swift
//  LGMusic
//
//  Created by 梁尚嘉 on 2017/3/24.
//  Copyright © 2017年 LimeGah. All rights reserved.
//

import UIKit

extension UIFont {

    /*
     自定义字体
     */
    class func customFont(size:CGFloat) -> UIFont {
        var font = UIFont.init(name: "pingFangSC-Regular", size: size)
        if font == nil {
            font = UIFont.systemFont(ofSize: size)
        }
        return font!
    }


    /*
     自定义粗体字体
     */
    class func customBoldFont(size:CGFloat) -> UIFont {
        var font = UIFont.init(name: "PingFangSC-Medium", size: size)
        if font == nil {
            font = UIFont.boldSystemFont(ofSize: size)
        }
        return font!
    }

    /*
     自定义特粗体字体
     */
    class func customEspecialBoldFont(size:CGFloat) -> UIFont {
        var font = UIFont.init(name: "PingFangSC-Semibold", size: size)
        if font == nil {
            font = UIFont.boldSystemFont(ofSize: size)
        }
        return font!
    }

}
